package cn.edu.scau.cmi.suwenpeng.chapter07;
interface Com{
	int add(int a,int b);
}
abstract class A_exercise5{
	abstract int add(int a,int b);
}
class B_exercise5 extends A_exercise5 implements Com{
	@Override
	 public int add(int a, int b) {		
	return a+b;
	}
}
public class E_exercise5 {
	public static void main(String[] args) {
	 B_exercise5 b=new B_exercise5();
	 Com com=b;
	 System.out.println(com.add(12, 6));
	 A_exercise5 a=b;
	 System.out.println(a.add(10, 5));
	}

}
